package com.fangmao.a27_hot_update;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    private TextView mTextView;
    private Button mShowTitleButton;
    private Button mHotFixButton;

    @Override

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mTextView = findViewById(R.id.textView);
        mShowTitleButton = findViewById(R.id.show_title);
        mShowTitleButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Title title = new Title();
                mTextView.setText(title.getTitle());
            }
        });

        mHotFixButton = findViewById(R.id.hot_fix);
        mHotFixButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                mTextView.setText(getClassLoader().getClass().getName());
                System.out.println(getClassLoader().getClass().getName());
            }
        });

//        getClassLoader().loadClass()
    }
}
